package com.ams.entity;

import java.io.Serializable;
import java.sql.Timestamp;
import java.util.List;

import com.ams.util.Constants;
import com.ams.util.TimeFormat;


public class Assest implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -2934997632370718235L;


	private int assestId;
	

	private Product product;
	
	
	private AssestDossier assDos;
	
	
	private Buyer buyer;
	
	
	private List<MaintainLog> logs;
	
	/*@Transient
	private String buyDateStr;*/
	
	private Timestamp buyDate;
	
	private int amount;
	
	private String financialCode,contractCode;
	
	public Assest(){
		
	}

	public int getAssestId() {
		return assestId;
	}

	public void setAssestId(int assestId) {
		this.assestId = assestId;
	}

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public AssestDossier getAssDos() {
		return assDos;
	}

	public void setAssDos(AssestDossier assDos) {
		this.assDos = assDos;
	}

	public Buyer getBuyer() {
		return buyer;
	}

	public void setBuyer(Buyer buyer) {
		this.buyer = buyer;
	}

	public Timestamp getBuyDate() {
		return buyDate;
	}

	public void setBuyDate(Timestamp buyDate) {
		this.buyDate = buyDate;
		
	}

	public int getAmount() {
		return amount;
	}

	public void setAmount(int amount) {
		this.amount = amount;
	}

	public String getFinancialCode() {
		return financialCode;
	}

	public void setFinancialCode(String financialCode) {
		this.financialCode = financialCode;
	}

	public String getContractCode() {
		return contractCode;
	}

	public void setContractCode(String contractCode) {
		this.contractCode = contractCode;
	}

	public List<MaintainLog> getLogs() {
		return logs;
	}

	public void setLogs(List<MaintainLog> logs) {
		this.logs = logs;
	}

	public String getBuyDateStr() {
		return TimeFormat.translateTimestampToString(buyDate, Constants.DATE_FORMAT);
	}

	public void setBuyDateStr(String buyDateStr) {
		this.buyDate=TimeFormat.translateStringToTimestamp(buyDateStr, Constants.DATE_FORMAT);
	}
	
	
}
